import request from '@/utils/request'
// export function getList(params) {
//   return request({
//     url: '/table/list',
//     method: 'get',
//     params
//   })
// }
// let token = getToken()
export function getList(page = 1) {
  return request({
    url: '/api/back/parts',
    methods: 'get',
    params: { page }
  })
}
export function getDiscountList(params) {
  return request({
    url: '/api/back/parts',
    method: 'get',
    params
  })
}
export function getStores(timerObj) {
  return request({
    url: '/api/back/stores',
    methods: 'get',
    params: timerObj
  })
}
export function getUsers(params) {
  return request({
    url: '/api/back/users',
    method: 'get',
    params
  })
}
export function getViewDetail(params) {
  return request({
    url: '/api/back/users/discount',
    method: 'get',
    params
  })
}
export function addPart(params) {
  return request({
    url: '/api/back/parts',
    method: 'post',
    params
  })
}
export function modifyDiscount(params) {
  return request({
    url: '/api/back/users/discount',
    method: 'post',
    params
  })
}
export function createNewItem(params) {
  return request({
    url: '/api/back/parts',
    method: 'post',
    params
  })
}
